x86/mem_sharing: modularize reverse map for shared frames
authorAndres Lagar-Cavilla <andres@lagarcavilla.org>
Thu, 26 Apr 2012 09:03:08 +0000 (10:03 +0100)
committerAndres Lagar-Cavilla <andres@lagarcavilla.org>
Thu, 26 Apr 2012 09:03:08 +0000 (10:03 +0100)
commit01b962bd49be2804ae9a12413d4a6667ba221552
tree7838e178e41d3cd4e2420c88ad9faae7236010a2
parent458519b78248d36700014e010386b7943df4e3a3
x86/mem_sharing: modularize reverse map for shared frames

Each shared frame maintains a reverse map of <domain, gfn> tuples, so we know
which tuples this shared frame is backing. This is useful for auditing and
sanity-checking, and necessary to update all relevant p2m entries when sharing.

The reverse map is maintained as a doubly linked list, but the interface is
open-coded throughout the mem_sharing.c subsystem. Bury it inside a level of
abstraction, so it can later support different (more scalable) rmap
implementations.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm/mem_sharing.c